Copyright: Copyright © 1997 Realsoft development


Add All button

See also

The Add All button allows you to include all of the files in a given directory.  Files added to the Include Form Files listbox will be parsed and Components you select in Step Three will be swapped.

To add single files in a given directory click the Add button.


Add Dest button

See also

The Add Dest button adds a destination component.  In order to add a destination component a "source" component must first be added.  When parsing the Component Swapper will replace the "source" component with the "destination" component.

To remove a source/destination set, select the line and click the lower Remove button.


Add New Component

See also

Click the Add New button to add a new component to your list of components.  The new component will be stored by the Component Swapper.  You can immediately use the new component, and it will be there the next time you run the Component Swapper.

Simply click Add New, and then type in the name of the component (usually beginning with "T").


Add Source button

See also

The Add Source button adds a source component to the lower listbox.  When parsing the Component Swapper will replace the "source" component with the "destination" component.  In order to add a destination component a "source" component must first be added.

To remove a source/destination set, select the line and click the lower Remove button.


Add button

See also

The Add button allows you to include single files in a given directory.  Files added to the Include Form Files listbox will be parsed and Components you select in Step Three will be swapped.

To add all of the files in a given directory click the Add All button.


Backup files

The option to create backup files is given so that if there is an error in swapping components, if you swapped a component for one that does not exist-- you can simply copy the backup files--the *.pbk and *.dbk files.  You can also attempt to undo your changes by simply re-swapping your unknown components for an existing component.

The *.pbk files are the backup files of you *.pas files and the *.dbk files are the backups of your *.dfm files.

If you choose not create backup files none will be made.


Contents

What is a Component Swapper?

Options

  Backup files

Step One

  Drive/Directory Box

  Include Dfm Files

  Add button

  Remove buttton

  Add All buttton

  Remove All button

Step Two

  Search

  Add New Component to the component list

  Remove Component from component list

  Remove Set

  Add Source button

  Add Destination button

Step Three

  Finish


Drive/Directory Box

See also

Select the Drive and Directory that your Delphi Pascal and Delphi Form Files are found in.  After selecting a directory that contains form files, they will appear in the lowest box on the left.


Finish

Clicking the Finish button allows the Component Swapper to begin its work.  It will open each of the files selected in Step one and will replace any source components for the destination components selected.

When opening the forms in Delphi after a Component Swap you may recieve the error, "Property does not exist" and then a property name.  This occurs because often the swapped components have one or more properties that do not exist in the destination class.  Simply press "OK" and Delphi will remove the reference.

If you recieve the error, "Error Creating Component-- Component does not exist" then the component that you exchanged did not exist, or there was an error in swapping.  This can occur if you have two items in the list that will conflict.  For example if you swap a TLabel for a TLabelSet and then a TLabel for a TLabelItem-- your result would be a TLabelItemSet-- which is not what you wanted at all.

If selected, the Component swapper will create backup files as *.pbk and *.dbk files that can be manually recopied over the pascal and form files in the event of an unknown component error.


Include Dfm Files

You can add and remove Delphi Form Files from this set using the Add button, the Remove button, the Add All button and the Remove All button.  Form files added to this box will replace the components you select in Step three.

The associated Delphi Pascal Files are generally in the same directory as the *.dfm files, and therefore the path for them is implied.  If the Pascal Files are not found then the Component Swapper will raise an error.


Remove All button

See also

The Remove All button allows you to remove all of the files in the Include Form Files listbox.  Files remaining the Include Form Files listbox will be parsed and Components you select in Step Three will be swapped.

To remove single files from the Include Form Files listbox click the Remove Button.


Remove Button

See also

The Remove button allows you to remove single files in the Include Form Files listbox.  Files remaining the Include Form Files listbox will be parsed and Components you select in Step Three will be swapped.

To remove all of the files from the Include Form Files listbox click the Remove All button.


Remove Component

See also

The upper remove button allows you to permanently/immediately remove a component from your component list.  The component will not be there when you run the Component Swapper again.  Simply select a component and click the upper remove button, and then click Ok when asked if you are sure.


Remove Set

The lower Remove button allows you to remove a source/destination set from the lower listbox.  All components with a source and destination will be swapped by the Component Swapper.  The lines in the lower listbox indicate those components marked for swapping.

Components can be added to the lists by clicking the Add Source button or the Add Dest button.


Search

The search feature allows you to incrementally search your list of components.  Simply type in the component name, or the first few letters of the component name (generally beginning with "T").  You can also incrementally search by selecting the Components listbox and typing the first few letters of the component you are searching for.


See also

Include *.Dfm Files


See also

Add Dest button


See also

Remove Component


See also

Add Source Button


See also

Remove Button


See also

Remove All button


See also

Add All button


See also

Add button


See also

Add new component


What is a Component Swapper?

A component swapper is a utility that was designed to aid programmers in switching numerous components on a form.  Because the components are in both the Delphi form file and pascal file this swap can become tedious.  The component swapper goes into each of these files for you and swaps the components you've added to your "Swap list."  The form component swapper can handle any component you add as it only swaps the declarations, however Delphi may have difficulty if components of different hierarchy are swapped.  For example, you should not attempt to swap a TEdit for a TImage, as most of thhe properties would not correspond.  However, swapping TEdit Components for TrsMaskEdits is almost seamless.

When opening the forms in Delphi after a Component Swap you may recieve the error, "Property does not exist" and then a property name.  This occurs because often the swapped components have one or more properties that do not exist in the destination class.  Simply press "OK" and Delphi will remove the reference.

If you recieve the error, "Error Creating Component-- Component does not exist" then the component that you exchanged did not exist, or there was an error in swapping.  This can occur if you have two items in the list that will conflict.  For example if you swap a TLabel for a TLabelSet and then a TLabel for a TLabelItem-- your result would be a TLabelItemSet-- which is not what you wanted at all.